<div class="vista_toolbar">
	<ul>
		<%= toolbar_add 'liite', 'attachments', customer %>
		<%= toolbar_delete_selected 'attachments' %>
	</ul>
</div>
<%form_remote_tag :url => destroy_selected_attachments_url, :confirm => 'Haluatko varmasti poistaa liitteet?', :before => "spinnerOn('attachments');", :complete => "spinnerOff('attachments');", :html => {:id => 'attachments_form'} do %><%if customer.attachments.empty? %>
<div class="container">
    Ei liitteitä.
</div>
<%else %>
<div class="scrollable">
<%customer.attachments.each do |attachment| %>
<div class="container">
    <div style="float:right">
        <%=checkbox_delete_selected 'attachments', attachment.id %>
    </div>
    <%=link_to attachment.filename, {:controller => 'attachments', :action => 'view', :id => attachment}, :popup => true, :html => {:class => 'name'} %>
    <div style="clear:both">
    </div>
</div>
<%end %>
</div>
<%end %>
<%end %>